
/*----------------------------------------------------------------------------------------------
Project: Strength in Numbers? Gender Composition, Leadership, and Women’s Influence in Teams
Researchers:  Christopher F. Karpowitz, Stephen D. O’Connell, Jessica Preece, and Olga Stoddard
------------------------------------------------------------------------------------------------*/

DESCRIPTION:

The code in this replication package constructs the analysis file from the data sources (SPECIFY DATA SOURCES) using Stata and R. One main file (main.do) run all of the code to generate the data for the 6 main figures, 6 appendix figures, and 19 appendix tables in the paper. The replicator should expect the code to run for about 16 hours, if including simulation process.


INSTRUCTIONS:

If you are in a Windows Machine or MacOS machine, the program "main.do" will construct all the data necessary for the replication
and construct the tables/figures presented in the paper. 

Note: If you are not in MacOS or Windows machine, the user will need to run
      manually each table or figure from the respectively folder. Those folder already contains the data necessary to perform the replication.

Note: Those tables for which there is no folder available were made by hand due to their qualitative nature.


In order to run "main.do", user will need to do the following changes:

1. Set the path to this replication package in the areas marked "USER: SET DIRECTORY HERE" (Lines 31 and 62)
2. Set the global variable "sim": it takes 1 if you would like to run the simulations necessary for figure 6 and a few of the appendix tables/figures and 0 if not.
3. If you are in a Windows machine, set the correct path according to the version of your R in the area marked "CHANGE VERSION NUMBER, IF WINDOWS". 
   We recommend greater or equal than 4.3.1 (See Line 44). In order to know what is the path that R is using in your machine, open a R console an type "file.path(R.home("bin"), "Rterm")"
4. Run "main.do"



COMPUTATIONAL REQUIREMENTS:

* Stata (code was last run with version 18)

	* rsource
	* estout 
	* outreg2 
	* distinct 
	* balancetable 
	* mhtexp 
	* filelist
	* The program "main.do" will install all dependencies locally, if necessary (See Step 2 in main.do)

* R 4.3.1 (2023-06-16)

	* The program "install_R_packages.R" will check all the libraries that this project is using
	and the user does not have locally, and install it automatically.
	* Program "main.do" will run this R script (See Step 4 in main.do)

MEMORY AND RUNTIME REQUIREMENTS

* Approximate time needed to reproduce the analysis on a standard desktop machine (including simulations): 16 hours
* The code was last run on a 8-core Intel-based laptop with Windows 11 and 8-core M1 laptop with macOS Ventura
 
Identifying hardware and OS can be obtained through a variety of ways: Some of these details can be found as follows:

* (Windows) by right-clicking on “This PC” in File Explorer and choosing “Properties”
* (Mac) Apple-menu > “About this Mac”




